﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;

namespace Foothill.IoC
{
    public class FileSystemHelper
    {
        internal static IEnumerable<string> GetAssemblyNamesInDirectory(string path)
        {
            IEnumerable<string> assemblyFilenames
                = Directory.GetFiles(path, "*.*", SearchOption.TopDirectoryOnly)
                .Where(s => s.EndsWith(".exe") || s.EndsWith(".dll"))
                .Select(f => Path.GetFileName(f));

            return assemblyFilenames;
        }
    }
}
